import request from '@/utils/request'
// 支付列表
export function payChannel() {
  return request({
    url: '/pay-channel',
    method: 'get'
  })
}
// 支付状态
export function payChannelStatus(data) {
  return request({
    url: '/pay-channel/status/' + data.id,
    method: 'post',
    data: data.status
  })
}
// 创建支付
export function CreatePayChannel(data) {
  return request({
    url: '/pay-channel',
    method: 'post',
    data
  })
}
// 修改支付
export function updatePayChannel(data) {
  return request({
    url: '/pay-channel/' + data.id,
    method: 'post',
    data
  })
}
// 支付排序
export function payChannelSort(data) {
  return request({
    url: 'pay-channel/sort',
    method: 'post',
    data
  })
}

// ------------------------------end-------------------------
// -----------------------------------其他设置 satrt---------------------------
// 两个第四方的微信列表页加载数据
export function listPayMsgData(data) {
  return request({
    url: '/recharge/listPayMsgData',
    method: 'post',
    data
  })
}
// 新增第四方支付信息
export function savPayMsg(data) {
  return request({
    url: '/recharge/savPayMsg',
    method: 'post',
    data
  })
}
// 修改第四方支付信息
export function updatePayMsg(data) {
  return request({
    url: '/recharge/updatePayMsg',
    method: 'post',
    data
  })
}
// 删除第四方支付信息 { "id":1 }
export function deletePayMsg(data) {
  return request({
    url: '/recharge/deletePayMsg',
    method: 'post',
    data
  })
}
// 第四方支付信息开关
export function updatePayMsgStatus(data) {
  return request({
    url: '/recharge/updatePayMsgStatus',
    method: 'post',
    data
  })
}
// 第四方支付信息开关
export function getRechargeStatus(data) {
  return request({
    url: '/recharge/getRechargeStatus',
    method: 'post',
    data
  })
}

// 保存消费总开关设置 { "id":1 }
export function upDateRechargeStatus(data) {
  return request({
    url: '/recharge/upDateRechargeStatus',
    method: 'post',
    data
  })
}
// 保存消费挡位设置 { "id":1， “itemList”:[ { "rechargeAmount":10, “givePercent”：10 } ] }
export function saveSettingItem(data) {
  return request({
    url: '/recharge/saveSettingItem',
    method: 'post',
    data
  })
}
// 获取消费挡位设置 { "id":1 }
export function getSettingItem(data) {
  return request({
    url: '/recharge/getSettingItem',
    method: 'post',
    data
  })
}
// ada

export function listAdaPayMsgData(data) {
  return request({
    url: '/recharge/listAdaPayMsgData',
    method: 'post',
    data
  })
}
export function saveAdaPayMsg(data) {
  return request({
    url: '/recharge/saveAdaPayMsg',
    method: 'post',
    data
  })
}
export function updateAdaPayMsg(data) {
  return request({
    url: '/recharge/updateAdaPayMsg',
    method: 'post',
    data
  })
}
export function updateAdaPayMsgStatus(data) {
  return request({
    url: '/recharge/updateAdaPayMsgStatus',
    method: 'post',
    data
  })
}
export function deleteAdaPayMsg(data) {
  return request({
    url: '/recharge/deleteAdaPayMsg',
    method: 'post',
    data
  })
}
export function setRechargeSortList(data) {
  return request({
    url: '/recharge/setRechargeSortList',
    method: 'post',
    data
  })
}
export function getRechargeSortList() {
  return request({
    url: '/recharge/getRechargeSortList',
    method: 'post'
  })
}

/* 天天畅付*/

export function listTtcfPayMsgData(data) {
  return request({
    url: '/recharge/listTtcfPayMsgData',
    method: 'post',
    data
  })
}

export function saveTtcfPayMsg(data) {
  return request({
    url: '/recharge/saveTtcfPayMsg',
    method: 'post',
    data
  })
}

export function updateTtcfPayMsg(data) {
  return request({
    url: '/recharge/updateTtcfPayMsg',
    method: 'post',
    data
  })
}

export function updateTtcfPayMsgStatus(data) {
  return request({
    url: '/recharge/updateTtcfPayMsgStatus',
    method: 'post',
    data
  })
}

export function deleteTtcfPayMsg(data) {
  return request({
    url: '/recharge/deleteTtcfPayMsg',
    method: 'post',
    data
  })
}

/* 曦月*/
export function listItemPayMsgData(data) {
  return request({
    url: '/recharge/listItemPayMsgData',
    method: 'post',
    data
  })
}

export function saveItemPayMsg(data) {
  return request({
    url: '/recharge/saveItemPayMsg',
    method: 'post',
    data
  })
}

export function updateItemPayMsg(data) {
  return request({
    url: '/recharge/updateItemPayMsg',
    method: 'post',
    data
  })
}

export function updateItemPayMsgStatus(data) {
  return request({
    url: '/recharge/updateItemPayMsgStatus',
    method: 'post',
    data
  })
}

export function deleteItemPayMsg(data) {
  return request({
    url: '/recharge/deleteItemPayMsg',
    method: 'post',
    data
  })
}

/* 慧支付*/
export function listHuiPayMsgData(data) {
  return request({
    url: '/recharge/listHuiPayMsgData',
    method: 'post',
    data
  })
}

/* 惠支付*/
export function saveHuiPayMsg(data) {
  return request({
    url: '/recharge/saveHuiPayMsg',
    method: 'post',
    data
  })
}

export function updateHuiPayMsg(data) {
  return request({
    url: '/recharge/updateHuiPayMsg',
    method: 'post',
    data
  })
}

export function updateHuiPayMsgStatus(data) {
  return request({
    url: '/recharge/updateHuiPayMsgStatus',
    method: 'post',
    data
  })
}

export function deleteHuiPayMsg(data) {
  return request({
    url: '/recharge/deleteHuiPayMsg',
    method: 'post',
    data
  })
}

/** 必城支付**/
// bcPay(101,"必诚支付")
// /recharge/listBcPayMsgData
// /recharge/saveBcPayMsg
// /recharge/updateBcPayMsg
// /recharge/updateBcPayMsgStatus
// /recharge/deleteBcPayMsg

export function listBcPayMsgData(data) {
  return request({
    url: '/recharge/listBcPayMsgData',
    method: 'post',
    data
  })
}

export function saveBcPayMsg(data) {
  return request({
    url: '/recharge/saveBcPayMsg',
    method: 'post',
    data
  })
}

export function updateBcPayMsg(data) {
  return request({
    url: '/recharge/updateBcPayMsg',
    method: 'post',
    data
  })
}

export function updateBcPayMsgStatus(data) {
  return request({
    url: '/recharge/updateBcPayMsgStatus',
    method: 'post',
    data
  })
}

export function deleteBcPayMsg(data) {
  return request({
    url: '/recharge/deleteBcPayMsg',
    method: 'post',
    data
  })
}

/** ************************************统统付支付宝*******************************************/

// /recharge/listMerchantData  列表页
// /recharge/addMerchant 新增
// /recharge/updateMerchant 修改
// /recharge/updateMerchant/open 开关
// /recharge/deleteMerchant 删除

// listMerchantData
// addMerchant
// updateMerchant
// updateMerchantOpen
// deleteMerchant

export function listMerchantData(data) {
  return request({
    url: '/recharge/listMerchantData',
    method: 'post',
    data
  })
}

export function addMerchant(data) {
  return request({
    url: '/recharge/addMerchant',
    method: 'post',
    data
  })
}

export function updateMerchant(data) {
  return request({
    url: '/recharge/updateMerchant',
    method: 'post',
    data
  })
}

export function updateMerchantOpen(data) {
  return request({
    url: '/recharge/updateMerchant/open',
    method: 'post',
    data
  })
}

export function deleteMerchant(data) {
  return request({
    url: '/recharge/deleteMerchant',
    method: 'post',
    data
  })
}

export function getZfbUser() {
  return request({
    url: 'recharge/getZfbUser',
    method: 'post'
  })
}
export function addZfbUser(data) {
  return request({
    url: 'recharge/zfbUser',
    method: 'post',
    data
  })
}
export function delZfbUser(id) {
  return request({
    url: 'recharge/delZfbUser',
    method: 'post',
    data:{ id }
  })
}
